// SettingsItem.qml - 可复用的设置项组件
import QtQuick 2.15

Rectangle {
    id: root
    height: 60
    color: "#ffffff"
    border.color: "#e0e0e0"
    border.width: 0.5

    property string itemName: ""
    property string itemIcon: ""

    signal clicked()

    MouseArea {
        anchors.fill: parent
        hoverEnabled: true

        onEntered: parent.color = "#f0f0f0"
        onExited: parent.color = "#ffffff"
        onClicked: root.clicked()
    }

    Row {
        anchors.left: parent.left
        anchors.leftMargin: 20
        anchors.verticalCenter: parent.verticalCenter
        spacing: 15

        Text {
            text: root.itemIcon
            font.pixelSize: 18
            anchors.verticalCenter: parent.verticalCenter
        }

        Text {
            text: root.itemName
            font.pixelSize: 16
            anchors.verticalCenter: parent.verticalCenter
            color: "#333333"
        }
    }

    Text {
        text: "→"
        font.pixelSize: 18
        anchors.right: parent.right
        anchors.rightMargin: 20
        anchors.verticalCenter: parent.verticalCenter
        color: "#666666"
    }
}
